package com.duobaoyu.dby.supply.biz.converter;

import com.duobaoyu.dby.channel.boundary.bean.account.param.BalanceChangeDetailParam;
import com.duobaoyu.dby.channel.boundary.bean.account.result.BalanceChangeDetailResult;
import com.duobaoyu.dby.channel.boundary.bean.account.result.BalanceInfoResult;
import com.duobaoyu.dby.channel.boundary.bean.phone.param.OperatorInfoParam;
import com.duobaoyu.dby.channel.boundary.bean.phone.result.OperatorInfoResult;
import com.duobaoyu.dby.common.core.constant.CommonConstants;
import com.duobaoyu.dby.common.core.convert.bean.ReferenceMapper;
import com.duobaoyu.dby.supply.biz.client.boundary.account.bean.bo.BalanceChangeDetailBO;
import com.duobaoyu.dby.supply.biz.client.boundary.account.bean.bo.BalanceInfoBO;
import com.duobaoyu.dby.supply.biz.client.boundary.account.bean.bo.OperatorInfoBO;
import com.duobaoyu.dby.supply.biz.client.boundary.account.bean.dto.BalanceChangeDetailDTO;
import com.duobaoyu.dby.supply.biz.client.boundary.account.bean.dto.OperatorInfoDTO;
import org.mapstruct.Builder;
import org.mapstruct.Mapper;

import java.util.List;

/**
 * @author liyang
 * @version 1.0.0
 * @ClassName ChannelAccountConverter
 * @createTime 16:51:00 2023/10/10
 */
@Mapper(uses = ReferenceMapper.class, builder = @Builder(disableBuilder = true), componentModel = CommonConstants.COMPONENT_MODEL)
public interface ChannelAccountConverter {

    /**
     * to BalanceInfoBO
     * @param balanceInfo
     * @return
     */
    BalanceInfoBO toBalanceInfo(BalanceInfoResult balanceInfo);

    /**
     * to BalanceChangeDetailParam
     * @param balanceChangeDetail
     * @return
     */
    BalanceChangeDetailParam toBalanceChangeDetailParam(BalanceChangeDetailDTO balanceChangeDetail);

    /**
     * to BalanceChangeDetailBO
     * @param balanceChangeDetailResult
     * @return
     */
    BalanceChangeDetailBO toBalanceChangeDetail(BalanceChangeDetailResult balanceChangeDetailResult);

    /**
     * to OperatorInfoParam
     * @param operatorInfo
     * @return
     */
    OperatorInfoParam toOperatorInfoParam(OperatorInfoDTO operatorInfo);

    /**
     * to OperatorInfoBO
     * @param phoneOperatorInfo
     * @return
     */
    OperatorInfoBO toOperatorInfo(OperatorInfoResult phoneOperatorInfo);

    /**
     * 渠道账户余额
     * @param balanceInfos
     * @return
     */
    List<BalanceInfoBO> toBalanceInfoList(List<BalanceInfoResult> balanceInfos);
}
